package acm.蓝桥24;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.BitSet;

public class F_存在相同余数 {
	public static void main(String[] args) {
		Reader2 sc=new Reader2();
		int t=sc.nextInt();
		while(t-->0) {
			int n=sc.nextInt();
			int m=sc.nextInt();
			BitSet set=new BitSet();
			String res="No";
			for(int i=1;i<=m;i++) {
				if(set.get(n%i)) {
					res="Yes";
					break;
				}
				set.set(n%i);
			}
			Reader2.pw.println(res);
			Reader2.pw.flush();
		}
	}
	static class Reader2 {
        static StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        static PrintWriter pw=new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

        public Reader2(Object... o) {
        }

        public int nextInt() {
            try {
                in.nextToken();
            } catch (Exception ignored) {}
            return (int) in.nval;
        }
	}
}
